<?php

require_once('../qcubed.inc.php');
require_once('panels/MyInfoPanel.class.php');
require_once('panels/mysettingspanel.class.php');

class MySettingsForm extends QForm {
    protected $lblUserName;

    protected $authSys;

    protected $tabMain;
    //Panels
    protected $pnlMySetting;
    protected $pnlMyInfo;
    protected $pnlSecAddress;

    protected function Form_Run() {
        $this->authSys = new Perm();
        $this->authSys->IsAuthenticated(false);

    }
    // Define all the QContrtol objects for our Calculator
    protected function Form_Create() {
        $this->tabMain = new Jtab("MainTab");



        $this->pnlMyInfo = New MyInfoPanel($this);
        $this->tabMain->AddTab(QApplication::Translate("MyInfo") , $this->pnlMyInfo);

        $this->pnlMySetting = new MySettingPanel($this);
        $this->tabMain->AddTab(QApplication::Translate("Password") , $this->pnlMySetting);
        
        $this->tabMain->AddTab(QApplication::Translate("My Contacts") );


        $mctUser = UserMetaControl::Create($this, $_SESSION[_SV_PERM_][_SV_PERM_ID_]);


    }

    protected function Form_Validate() {
        // By default, we report that Custom Validations passed
        $blnToReturn = true;

        $blnFocused = false;
        foreach ($this->GetErrorControls() as $objControl) {
            // Set Focus to the top-most invalid control
            if (!$blnFocused) {
                $objControl->Focus();
                $blnFocused = true;
            }
            $objControl->Blink();
        }

        return $blnToReturn;
    }

}

// And now run our defined form
MySettingsForm::Run('MySettingsForm','tpl/mysettingsform.tpl.php');
?>
